//
// Copyright (c) 2011 Alex Nesterenko
//

#ifndef NANE_X11WINDOW_H
#   define  NANE_X11WINDOW_H

#   include "nane/WindowSystem/IWindowSystem.h"

#   include <X11/Xlib.h>

namespace nane
{
    class X11Window
        : public IWindow
    {
    public:
        X11Window( Display* _display, Window _hWindow, Atom _deleteAtom );
        ~X11Window();

        void handleEvent( const XEvent& _event );
        void onClose();

    public:
        OSHandle getOSHandle();
        void show();
        void updateMessages();
        void setMessageHandler( IWindowMessageHandler* _handler );

    private:
        Display* m_display;
        Window m_hWindow;
        Atom m_deleteAtom;
        IWindowMessageHandler* m_handler;
    };
}   // namespace nane

#endif // NANE_X11WINDOW_H
